/**
 * Created by imouze on 2017-10-31.
 */
const compose = require('koa-compose');
const bodyParser = require('koa-bodyparser');
const controller = require('./controller');
const render = require('./render');
const koaLogger = require('koa-logger');
const xxsfilter = require('./xxsfilter');
const koaOnerror = require('koa-onerror');
const staticFiles = require('./static-file');
const logger = require('./logger');


module.exports = compose([
    bodyParser,
    logger(),
    xxsfilter(),
    require('koa-static')(__dirname + '/static'),
    render(),
    staticFiles('/static/', __dirname + '/static'),
    controller()
]);
